package com.alstudio.utils.android.net.download;

import android.content.Context;

public class ALHttpDownloadManager {

	public static void startDownload(final Context context, final String url,
			final String path, final String fileName,
			ALHttpDownloadListener listener) {
		ALHttpDownloadTask task = new ALHttpDownloadTask(context, url, path,
				fileName, listener);
		task.execute();
	}

	public static void startDownload(final Context context, final String url,
			final String path, final String fileName,
			ALHttpDownloadListener listener, final String fileId) {
		ALHttpDownloadTask task = new ALHttpDownloadTask(context, url, path,
				fileName, listener);
		task.setFileId(fileId);
		task.execute();
	}

	public static ALHttpDownloadTask startDownload(final Context context,
			final String url, final String path, final String token,
			final String fileName, ALHttpDownloadListener listener) {
		ALHttpDownloadTask task = new ALHttpDownloadTask(context, url, path,
				fileName, listener);
		task.setToken(token);
		task.execute();
		return task;
	}

}
